﻿using PowerHub.MES.Controllers.Crew;
using PowerHub.MES.DTO.Crew.QueryDto;
using PowerHub.MES.DTO.Shopfloor.QueryDTO;
using PowerHub.MES.Entities.Crew;
using PowerHub.MES.Entities.Shopfloor;
using PowerHub.MES.ReturnEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PowerHub.MES.IRepository.ICrew
{
    /// <summary>
    /// 排班计划数据接口层
    /// </summary>
    public interface ICrew_SchedulingPlanRepository
    {
        /// <summary>
        /// 获取排班计划列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Task<OperationPageResult<List<Crew_SchedulingPlan>>> GetCrew_SchedulingPlanPageListAsync(QueryCrew_SchedulingPlanDTO query);

        /// <summary>
        /// 添加排班计划
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Task<OperationResult<bool>> CreateCrew_SchedulingPlanAsync(Crew_SchedulingPlan query);

        /// <summary>
        /// 批量删除排班计划
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Task<OperationResult<bool>> DeletionCrew_SchedulingPlanAsync(List<string>? ids);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Task<OperationResult<bool>> UpdateCrew_SchedulingPlanAsync(Crew_SchedulingPlan query);
        /// <summary>
        /// 根据班组id获取排班计划
        /// </summary>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public Task<Crew_SchedulingPlan> GetCrew_SchedulingPlanByIdAsync(QueryCrew_SchedulingPlanDTO pageQuery);

        /// <summary>
        /// 根据计划Id绑定工单
        /// </summary>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public Task<OperationResult<bool>> UpdateCrew_SchedulingPlanByBindWorkOrderAsync(Crew_SchedulingPlan query);
    }
}
